using System;
using System.ComponentModel.DataAnnotations;

namespace Comteck.Dto.Goods {
  /// <summary>
  /// 
  /// </summary>
  public class ProductDto : NotifyViewModel {
    /// <summary>
    /// 商品id
    /// </summary>
    public virtual int Id { get => _Id; set => SetProperty(ref _Id, value); }
    private int _Id;

    /// <summary>
    /// 商品编码
    /// </summary>
    public virtual string Code { get => _Code; set => SetProperty(ref _Code, value); }
    private string _Code;

    /// <summary>
    /// 商品名称
    /// </summary>
    [Display(Name = "商品名称")]
    [Required(ErrorMessage = "{0} 不能为空")]
    [MaxLength(length: 500, ErrorMessage = "{0} 最大长度为 {1}.")]
    public virtual string Name { get => _Name; set => SetProperty(ref _Name, value); }
    private string _Name;

    /// <summary>
    /// 重量
    /// </summary>
    public virtual decimal Weight { get => _Weight; set => SetProperty(ref _Weight, value); }
    private decimal _Weight;

    /// <summary>
    /// 备注
    /// </summary>
    [Display(Name = "备注")]
    [MaxLength(length: 500, ErrorMessage = "{0} 最大长度为 {1}.")]
    public virtual string Description { get => _Description; set => SetProperty(ref _Description, value); }
    private string _Description;

    /// <summary>
    /// 创建时间
    /// </summary>
    public virtual DateTime? CreateTime { get => _CreateTime; set => SetProperty(ref _CreateTime, value); }
    private DateTime? _CreateTime;
  }
}
